<template>
  <el-card>
    <div class="cn">
      {{this.$session.get("coursename")}}
    </div>
    <div style="float:right">
      <el-button type="danger" @click="ret" round icon="el-icon-refresh-right" plain>返回</el-button>
    </div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item>公众</el-breadcrumb-item>
      <el-breadcrumb-item>课程对应指标支撑度信息</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="searchForm">
      <el-form :inline="true" class="demo-form-inline">
        <el-form-item>
          <el-input v-model="queryInfo.query" placeholder="请输入指标编号" clearable @clear="getAllCourseIndicatorSupportList"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="" @click="getAllCourseIndicatorSupportList" icon="el-icon-search">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
    <el-table :header-cell-style="{background:'#808080',color:'#FFFFFF'}" border stripe :data="List" style="width: 100%">
      <el-table-column prop="sid" label="指标编号"  align="center">
      </el-table-column>
      <el-table-column prop="sindicname" label="指标名称"  align="center">
      </el-table-column>
      <el-table-column prop="supports" label="指标支撑度"  align="center">
      </el-table-column>
    </el-table>
    <div>
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="queryInfo.pageNum"
        :page-sizes="[4]"
        :page-size="queryInfo.pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total">
      </el-pagination>
    </div>
  </el-card>
</template>


<script>
  export default {
    name: 'addUser',
    created(){
      this.getAllCourseIndicatorSupportList();
    },
    data() {
      return {
        queryInfo:{
          role:this.$session.get("coursename"),
          query:'',//查询信息
          pageNum:1,
          pageSize:4
        },
        List:[],
        total:0,
        addDialogVisible:false,
      }
    },
    methods: {
      async getAllCourseIndicatorSupportList () {
        const { data: res } = await this.$http.get("Publics/AllCourseIndicatorSupport", { params: this.queryInfo })
        this.List = res.data;
        this.total = res.numbers;
      },
      handleSizeChange (newSize) {
        this.queryInfo.pageSize = newSize;
        this.getAllCourseIndicatorSupportList();
      },
      handleCurrentChange (newPage) {
        this.queryInfo.pageNum = newPage;
        this.getAllCourseIndicatorSupportList();
      },
      addDialogClose () {
        this.$refs.addFormRef.resetFields();
      },
      editDialogClose () {
        this.$refs.editFormRef.resetFields();
      },
      ret(){
        this.$router.push({ path: "/Pub_indicator"});
      },
    }
  }
</script>

<style scoped>
  .searchForm{
    margin-top: 40px;
  }
  .cn{
    font-size: 35px;
    text-align: center;
    color: transparent;
    background-color : black;
    text-shadow : rgba(255,255,255,0.5) 0 5px 6px, rgba(255,255,255,0.2) 1px 3px 3px;
    -webkit-background-clip : text;
  }
</style>
